package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

/** enter page by Ticketing \Call Home E-Mails , create and save record*/
public class SpTicketCallHomeEmailPageUtil extends SeleniumPageUtil {
	
	public final static By TCHE_TD_DATE_RANGE 			= By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table/tbody/tr[1]/td");
	public final static By TCHE_INPUT_START_DATE 			= By.id("ctl44_dteStartDate_txtDatePart");
	public final static By TCHE_IMG_START_CALENDAR 			= By.id("ctl44_dteStartDate_imgDateCalendar");
	public final static By TCHE_DIV_START_DATE_CLOSE = By.id("ctl44_dteStartDate_txtDatePart_CalendarExtender_close");
	public final static By THCE_SELECT_START_HOUR			= By.id("ctl44_dteStartDate_cboHour");
	public final static By TCHE_SELECT_START_MINUTE			= By.id("ctl44_dteStartDate_cboMinute");
	public final static By TCHE_SELECT_START_MERIDIEM			= By.id("ctl44_dteStartDate_cboMeridiem");
	public final static By TCHE_INPUT_END_DATE 			= By.id("ctl44_dteEndDate_txtDatePart");
	public final static By TCHE_IMG_END_CALENDAR 			= By.id("ctl44_dteEndDate_imgDateCalendar");
	public final static By TCHE_DIV_END_DATE_CLOSE = By.id("ctl44_dteEndDate_txtDatePart_CalendarExtender_close");
	public final static By TCHE_SELECT_END_HOUR			= By.id("ctl44_dteEndDate_cboHour");
	public final static By TCHE_SELECT_END_MINUTE			= By.id("ctl44_dteEndDate_cboMinute");
	public final static By TCHE_SELECT_END_MERIDIEM			= By.id("ctl44_dteEndDate_cboMeridiem");
	public final static By TCHE_SUBMIT_BTN			= By.id("btnSubmit");
	public final static By TCHE_SPAN_HEAD_TITLE			= By.id("ctl44_InboundEmails_Header_lblHeader");
	public final static By TCHE_IMG_EXPORT			= By.id("ctl44_InboundEmails_Header_imgExcelExport");
	public final static By TCHE_IMG_PAGE_FIRST			= By.id("ctl44_InboundEmails_PagingTop_imgFirst");
	public final static By TCHE_IMG_PAGE_PREVIOUS			= By.id("ctl44_InboundEmails_PagingTop_imgPrevious");
	public final static By TCHE_IMG_PAGE_NEXT			= By.id("ctl44_InboundEmails_PagingTop_imgNext");
	public final static By TCHE_IMG_PAGE_LAST			= By.id("ctl44_InboundEmails_PagingTop_imgLast");
	
	public final static By TCHE_LBL_PAGE = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table/tbody/tr[2]/td/table[2]/tbody/tr/td[1]");
	public final static By TCHE_LBL_PAGE_NO = By.id("ctl44_InboundEmails_PagingTop_lblPagingPageNumber");
	public final static By TCHE_LBL_PAGE_OF = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table/tbody/tr[2]/td/table[2]/tbody/tr/td[3]");
	public final static By TCHE_LBL_SUBJECT = By.id("ctl44_InboundEmails_sort_1");
	public final static By TCHE_LBL_DATE_SORT = By.id("ctl44_InboundEmails_sort_2");
	public final static By TCHE_LBL_DATE_PRO = By.id("ctl44_InboundEmails_sort_4");
	public final static By TCHE_LBL_ACTION = By.id("ctl44_InboundEmails_sort_5");
	
	
	public static void enter(){
		SpHomePageUtil.enter();
		SpHomePageUtil.enterCallHomeEmailPage();
	}
	
	public static void waitForPageToLoad(){
		// call home email page in content area
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				TCHE_SUBMIT_BTN,TCHE_SELECT_START_MERIDIEM,TCHE_IMG_END_CALENDAR
			});
	}
	

}
